package infoholders;

/**
 * Prescription.java
 * 
 */
import people.Doctor;
import people.Patient;

/**
 * This class is an information holder for a doctor's order.
 * 
 * @author Suren Nihalani
 * @version $Revsion$
 * 
 */
public class Prescription {
	/**
	 * The doctor who prescribed this.
	 */
	private final Doctor myDoctor;

	/**
	 * The patient using the prescription
	 */
	private final Patient myPatient;

	/**
	 * The name of the drug.
	 */
	private String drugName;

	/**
	 * Instructions of when to take the drug
	 */
	private String drugInstructions;

	/**
	 * Price of the drug.
	 */
	private String drugPrice;

	/**
	 * Other warnings for the drug.
	 */
	private String drugDetails;

	/**
	 * Constructor for Prescription.
	 * 
	 * @param referrer
	 *            Doctor
	 * @param user
	 *            Patient
	 */
	public Prescription(Doctor referrer, Patient user) {
		myDoctor = referrer;
		myPatient = user;
		drugName = "";
		drugInstructions = "";
		drugPrice = "";
		drugDetails = "";
	}

	/**
	 * Method getDrugInstructions.
	 * 
	 * @return String
	 */
	public String getDrugInstructions() {
		return drugInstructions;
	}

	/**
	 * Method setDrugInstructions.
	 * 
	 * @param drugInstructions
	 *            String
	 */
	public void setDrugInstructions(String drugInstructions) {
		this.drugInstructions = drugInstructions;
	}

	/**
	 * Method getMyDoctor.
	 * 
	 * @return Doctor
	 */
	public Doctor getMyDoctor() {
		return myDoctor;
	}

	/**
	 * Method getMyPatient.
	 * 
	 * @return Patient
	 */
	public Patient getMyPatient() {
		return myPatient;
	}

	/**
	 * Method setDrugName.
	 * 
	 * @param newDrug
	 *            String
	 */
	public void setDrugName(String newDrug) {
		drugName = newDrug;
	}

	/**
	 * Method getDrugName.
	 * 
	 * @return String
	 */
	public String getDrugName() {
		return drugName;
	}

	/**
	 * Method setDrugPrice.
	 * 
	 * @param drugPrice
	 *            String
	 */
	public void setDrugPrice(String drugPrice) {
		this.drugPrice = drugPrice;
	}

	/**
	 * Method getDrugPrice.
	 * 
	 * @return String
	 */
	public String getDrugPrice() {
		return drugPrice;
	}

	/**
	 * Method setDrugDetails.
	 * 
	 * @param drugDetails
	 *            String
	 */
	public void setDrugDetails(String drugDetails) {
		this.drugDetails = drugDetails;
	}

	/**
	 * Method Getter for drug detials.
	 * 
	 * @return Warnings
	 */
	public String getDrugDetails() {
		return drugDetails;
	}

	/**
	 * String representation of Prescription.java
	 * 
	 * @return The string representation
	 */
	public String toString() {
		return "Prescription with drug name: " + drugName + "for Patient"
				+ myPatient;
	}
}
